import request from '@/utils/request'

export default {
  //讲师列表（分页条件查询）
  getTeacherListPage(current, limit, teachQuery) {
    return request({
      url: `/edu/teacher/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
      data: teachQuery
    })
  },
  //删除讲师
  deleteTeacherId(id) {
    return request({
      url: `/edu/teacher/${id}`,
      method: 'delete'
    })
  },

  //添加讲师
  addTeacher(teacher) {
    return request({
      url: `/edu/teacher/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  //根据id查询讲师，做回显
  getTeacherInfo(id) {
    return request({
      url: `/edu/teacher/getTeacher/${id}`,
      method: 'get',
    })
  },

  //修改讲师
  updateTeacher(teacher) {
    return request({
      url: `/edu/teacher/updateTeacher`,
      method: 'post',
      data: teacher
    })
  }
}
